import { IAppMenuAbility } from '../ability';
import { ICtrlActionResult } from '../data-action';
import { IAppMenuStore } from '../store';
import { ICtrlController } from './i-ctrl-controller';

/**
 * 表格部件控制器接口
 *
 * @export
 * @interface IAppMenuController
 * @extends {IWidgetsController}
 */
export interface IAppMenuController<
	S extends IAppMenuStore,
	A extends IAppMenuAbility
> extends ICtrlController<S, A> {
	/**
	 * 处理菜单点击
	 *
	 * @param {string} name
	 * @memberof IAppMenuController
	 */
	handleMenuClick(name: string): void;

	/**
	 * 按钮加载
	 *
	 * @return {*}  {Promise<ICtrlActionResult>}
	 * @memberof IAppMenuController
	 */
	load(): Promise<ICtrlActionResult>;
}
